<template>
  <div class="sidebar_box">
    <div class="header">
      <div class="image"></div>
      <span class="font">云桌面</span>
    </div>
    <div class="content">
      <el-menu
        :default-active="route.path"
        class="el-menu-vertical-demo"
        background-color="#334388"
        text-color="#fff"
        router
      >
        <el-menu-item index="/home">
          <el-icon><discount /></el-icon>
          <span>首页</span>
        </el-menu-item>
        <el-sub-menu index="/a">
          <template #title>
            <el-icon><lightning /></el-icon>云桌面</template
          >
          <el-menu-item index="/cloudD">
            <el-icon><lightning /></el-icon>
            <span>云桌面</span>
          </el-menu-item>
          <el-menu-item index="/cloudB">
            <el-icon><aim /></el-icon>
            <span>云浏览器</span>
          </el-menu-item>
        </el-sub-menu>
        <el-menu-item index="/stytem">
          <el-icon><tools /></el-icon>
          <span>云文件</span>
        </el-menu-item>
        <el-menu-item index="/cloudF">
          <el-icon><printer /></el-icon>
          <span>云架构</span>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>
<script setup>
import { useRoute } from 'vue-router'
const route = useRoute()
</script>
<style lang="less" scoped>
.sidebar_box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  .header {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    .image {
      width: 50px;
      height: 50px;
      background-image: url("~@/assets/images/file.png");
      background-size: 100% 100%;
    }
    .font {
      font-size: 30px;
      margin-left: 10px;
      color: #7baed0;
      font-weight: bold;
    }
  }
  .content {
    flex: 1;
  }
}
</style>
